-- GENERATED SPELL FOR [Forgotten One] --


function spell0_30414(pUnit, Event) --@Psychic Scream,Self--
pUnit:FullCastSpellOnTarget(34322,pUnit)
pUnit:RegisterEvent('Sorts_30414', 4275, 1)
end

function spell1_30414(pUnit, Event) --@Shadow Crash,n/a--
pUnit:FullCastSpellOnTarget(60833,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30414', 1000, 1)
end

function spell2_30414(pUnit, Event) --@Shadow Crash,n/a--
pUnit:FullCastSpellOnTarget(60848,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30414', 1000, 1)
end

function spell3_30414(pUnit, Event) --@Shadow Nova,Self--
pUnit:FullCastSpellOnTarget(60845,pUnit)
pUnit:RegisterEvent('Sorts_30414', 588, 1)
end

function spell4_30414(pUnit, Event) --@Shadow Nova,Self--
pUnit:FullCastSpellOnTarget(60851,pUnit)
pUnit:RegisterEvent('Sorts_30414', 522, 1)
end

function Sorts_30414(pUnit, Event)
local choix_sorts_30414 = math.random(0, 4)
if choix_sorts_30414 == 0 then
pUnit:RegisterEvent('spell0_30414', 1, 1)
end
if choix_sorts_30414 == 1 then
pUnit:RegisterEvent('spell1_30414', 1, 1)
end
if choix_sorts_30414 == 2 then
pUnit:RegisterEvent('spell2_30414', 1, 1)
end
if choix_sorts_30414 == 3 then
pUnit:RegisterEvent('spell3_30414', 1, 1)
end
if choix_sorts_30414 == 4 then
pUnit:RegisterEvent('spell4_30414', 1, 1)
end
end

function mob30414_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30414', math.random(1500, 3000), 1)
end

function mob30414_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30414_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30414_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30414, 1, 'mob30414_Action')
RegisterUnitEvent(30414, 2, 'mob30414_Leave')
RegisterUnitEvent(30414, 3, 'mob30414_Kill')
RegisterUnitEvent(30414, 4, 'mob30414_Die')
